﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Model
{
    /// <summary>
    /// 临时数据类表
    /// </summary>
    public class CardItems
    { 
        // 内部成员
        private int quantity = 1;
        private string itemId = "{00000000-0000-0000-0000-000000000000}";
        private string name = "";
        private decimal price = 0;
        private string productId = "{00000000-0000-0000-0000-000000000000}";
        private string productName = "";
        private string orderId = "{00000000-0000-0000-0000-000000000000}";
        

        /// <summary>
        /// Default constructor
        /// </summary>
        public CardItems() { }

        /// <summary>
        /// Constructor with specified initial values
        /// </summary> 
        public CardItems(string itemId, string name, int qty, decimal price, string productId, string productName)
        {
            this.itemId = itemId;
            this.name = name;
            this.quantity = qty;
            this.price = price;
            this.productId = productId;
            this.productName = productName;
        }

        /// <summary>
        /// Constructor with specified initial values
        /// </summary> 
        public CardItems(string itemId, string name, int qty, decimal price, string productId, string productName, string orderId)
        {
            this.itemId = itemId;
            this.name = name;
            this.quantity = qty;
            this.price = price;
            this.productId = productId;
            this.productName = productName;
            this.orderId = orderId;
        }

        // Properties
        public int Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        } 

        public string ItemId
        {
            get { return itemId; }
            set { itemId = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public decimal Price
        {
            get { return price; }
            set { price = value; }
        }

        public string ProductId
        {
            get
            {
                return productId;
            }
            set { productId = value; }
        } 

        public string ProductName
        {
            get
            {
                return productName;
            }
            set { productName = value; }
        }

        public string OrderId
        {
            get
            {
                return orderId;
            }
            set { orderId = value; }
        }
    }
}
